package com.hdwe.tools.pm.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.hdwe.tools.pm.domain.PmRequire;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.core.constant.CacheNames;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import org.dromara.common.translation.annotation.Translation;
import org.dromara.common.translation.constant.TransConstant;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;


/**
 * 需求视图对象 pm_require
 *
 * @author s
 * @date 2024-12-10
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = PmRequire.class)
public class PmRequireVo extends BaseEntityVO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 需求主键
     */
    @ExcelProperty(value = "需求主键")
    private Long id;

    /**
     * 租户编号
     */
    @ExcelProperty(value = "租户编号")
    private String tenantId;

    /**
     * 标题
     */
    @ExcelProperty(value = "标题")
    private String title;

    /**
     * 需求类型（inner内部需求 customer客户需求）
     */
    @ExcelProperty(value = "需求类型", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "inner=内部需求,customer=客户需求")
    private String requireType;

    /**
     * 优先级（low低 middle中 high高）
     */
    @ExcelProperty(value = "优先级", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "low=低,middle=中,high=高")
    private String priority;

    /**
     * 内容
     */
    @ExcelProperty(value = "内容")
    private String content;

    /**
     * 图片、文件
     */
    @ExcelProperty(value = "图片、文件")
    private String files;

    /**
     * 关联人员
     */
    @ExcelProperty(value = "关联人员")
    private String relatedUsers;

    /**
     * 关联人员名称
     */
    @Translation(type = TransConstant.COMBOBOX_KEY_TO_LABEL, mapper = "relatedUsers", other = CacheNames.COMBOBOX_USER)
    @ExcelProperty(value = "关联人员名称")
    private String relatedUsersName;

    /**
     * 截止时间
     */
    @ExcelProperty(value = "截止时间")
    private LocalDateTime endDate;

    /**
     * 耗时
     */
    @ExcelProperty(value = "耗时")
    private Long costTime;

    /**
     * 状态
     */
    @ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "处理中,已完成,非需求,重复")
    private String status;

    /**
     * 创建部门
     */
    @ExcelProperty(value = "创建部门")
    private Long createDept;

    /**
     * 创建者
     */
    @ExcelProperty(value = "创建者")
    private Long createBy;

    /**
     * 创建时间
     */
    @ExcelProperty(value = "创建时间")
    private Date createTime;

    /**
     * 修改者
     */
    @ExcelProperty(value = "修改者")
    private Long updateBy;

    /**
     * 创建时间
     */
    @ExcelProperty(value = "创建时间")
    private Date updateTime;

    /**
     * 负责人
     */
    @ExcelProperty(value = "负责人")
    private String owner;

}
